package com.iq50.client.service.impl;

import com.iq50.client.routeguide.Feature;
import com.iq50.client.routeguide.Point;
import com.iq50.client.routeguide.Rectangle;
import com.iq50.client.routeguide.RouteGuideClient;
import com.iq50.client.service.RouteGuideService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Iterator;

@Service
public class RouteGuideServiceImpl implements RouteGuideService {

    @Autowired
    RouteGuideClient routeGuideClient;

    @Override
    public Feature GetFeature(Point point) {
        return routeGuideClient.getRPCMethods().getFeature(point);
    }

    @Override
    public Iterator<Feature>  ListFeatures(Rectangle rectangle) {
        return routeGuideClient.getRPCMethods().listFeatures(rectangle);
    }


}
